#!/usr/bin/env python

import hashlib
import os

def util_get_md5(file):
   if not os.path.exists(file):
	raise Exception('file path is not exist.')
   md5file = open(file, 'rb')
   md5=hashlib.md5(md5file.read()).hexdigest()
   md5file.close()
   return md5

if __name__ == '__main__':
   print util_get_md5('/home/zhangle/etl/etl/data/original/GI_2015_11_15.tgz')

